<!--{if empty($diymode)}-->
<!--{template common/header}-->

<!-- header start -->
<div class="bz-header">
	<div class="bz-header-left">
		<a href="home.php?mod=space&uid=$_G[uid]&do=profile&mycenter=1" class="iconfont icon-fanhui"></a>
	</div>
	<h2>
		<div class="bz-fav-appl">
			<div class="tbn">
				<ul>
					<li$actives[thread]><a href="home.php?mod=space&do=favorite&type=thread">{lang favorite_thread}</a></li>
					<li$actives[forum]><a href="home.php?mod=space&do=favorite&type=forum">{lang favorite_forum}</a></li>
				</ul>
			</div>
		</div>	
	</h2>
	<div class="bz-header-right">
		<a href="search.php?mod=forum&mobile=2" class="iconfont icon-search"></a>
	</div>
</div>
<div class="banzhuan-top"></div>
<div class="banzhuan-h10"></div>
<!-- header end -->

<div id="ct" class="ct2_a wp cl bz-p10 bz-bg-fff bz-fav-main">
	<div class="mn">
		<div class="bm bw0">
		
		<!--{else}-->
		<!--{template home/space_header}-->
			<div id="ct" class="wp n cl">
				<div class="mn">
					<div class="bm">
						<h1 class="mt">{lang favorite}</h1>
		<!--{/if}-->
					<!--{if $list}-->
					<form method="post" autocomplete="off" name="delform" id="delform" action="home.php?mod=spacecp&ac=favorite&op=delete&type=$_GET[type]&checkall=1" onsubmit="showDialog('{lang del_select_favorite_confirm}', 'confirm', '', '$(\'delform\').submit();'); return false;">
					<input type="hidden" name="formhash" value="{FORMHASH}" />
					<input type="hidden" name="delfavorite" value="true" />
					<ul id="favorite_ul">
						<!--{loop $list $k $value}-->
						<li id="fav_$k" class="bbda ptm pbm">
							<a class="y" id="a_delete_$k" href="home.php?mod=spacecp&ac=favorite&op=delete&favid=$k" onclick="showWindow(this.id, this.href, 'get', 0);" style="color: #F1F1F1;"><em class="iconfont icon-guanbi"></em></a>
							
							<!--{if $_GET['type'] == 'all'}--><!--{/if}-->
							<a href="$value[url]" style="font-size: 15px;">$value[title]</a>
							
							<!--{if $value[description]}-->
							<!--{/if}-->
							
						</li>
						<!--{/loop}-->
					</ul>
					</form>
					<!--{if $multi}--><div class="pgs cl mtm">$multi</div><!--{/if}-->
					
					<!--{else}-->
						<div class="guide-no">
							<p class="iconfont icon-quxiaoguanzhu color-b" style="font-size: 40px;"></p>
							<p class="color-b">{lang no_favorite_yet}</p>
						</div>
					
					<!--{/if}-->
		<!--{if empty($diymode)}-->
				</div>
			</div>
			
		</div>
		
		<!--{else}-->

		</div>
	</div>
</div>

<!--{/if}-->

<script type="text/javascript">
	function favorite_delete(favid) {
		var el = $('fav_' + favid);
		if(el) {
			el.style.display = "none";
		}
	}
	<!--{if $_GET[type] == "thread"}-->
	function collection_favorite() {
		var form = $('delform');
		var prefix = '^favorite';
		var tids = '';
		for(var i = 0; i < form.elements.length; i++) {
			var e = form.elements[i];		
			if(e.name.match(prefix) && e.checked) {
				tids += 'tids[]=' + e.getAttribute('vid') + '&';
			}
		}
		if(tids) {
			showWindow(null, 'forum.php?mod=collection&action=edit&op=addthread&' + tids);
		}
	}
	function update_collection() {}
	<!--{/if}-->
</script>

<!--{template common/footer}-->
